/*
 * Alexey Danchuk
 * This software is an implementation of the task from OOP module.
 */
package knowledgetestsystem;

/**
 * This class describes student module.
 * 
 * @version 2.03 10 February 2013
 * @author Alexey Danchuk
 */
class Student extends User {

	private static int studentMark = 0;

	/**
	 * Some magic ratio.
	 */
	private static int factor = Manipulator.getTestSize() / 2;

	public Student(final String name) {
		super(name);
	}

	@Override
	protected void initializationTest() {
		System.out.println("Not permit...");
	}

	@Override
	protected void takeTheTest() {
		super.takeTheTest();
		setStudentMark(InOut.feedback);
	}

	public void getStudentMark() {
		System.out.println(getUserName()
						   + ", your mark is: " + studentMark);
	}

	private static void setStudentMark(final int studentMark) {
		Student.studentMark = studentMark + factor;
	}
}
